package plane

import (
	"fmt"
)

var qianbao float32

func Fengxing() {

}
func Login() {

	var cuiniao bird
	cuiniao.age = 2
	cuiniao.Name = "翠鸟"
	cuiniao.chibang = "有翅膀"

	var cl Person
	cl.age = 22
	cl.Name = "陈龙"
	cl.zhihui = "会用工具"
	cl.pet = &cuiniao

	fmt.Println("请输入用户名")
	var name string
	fmt.Scanln(&name)
	fmt.Println("请输入密码")
	var pswd string
	fmt.Scanln(&pswd)
	if name == "cuiniao" && pswd == "158611" {
		fmt.Println("登录成功", "你的宠物是", cl.pet.Name)
	} else {
		fmt.Println("登录失败")
		return
	}
}

func Jianchahuzhao() {
	fmt.Println("请出示护照")
	var input float32
	fmt.Scanln(&input)
	if input <= 0 {
		fmt.Println("没有") //只要不是无 就允许登机
		return
	} else {
		fmt.Println("允许登机")
	}

}

type animal struct {
	Name string
	age  int
	size string
}

type bird struct {
	animal
	chibang string
}
type Person struct {
	animal
	zhihui string
	pet    *bird
}
